import { NextRequest, NextResponse } from "next/server";

// GET => /api/userList/:id
export const GET = (request: NextRequest) => {
  // 取参 方法1
  const searchParams = request.nextUrl.searchParams;
  console.log(searchParams.get("id"));
};

// DELETE => /api/userList/:id
export const DELETE = (
  request: Request,
  { params }: { params: { id: string } }
) => {
  // 取参 方法2
  console.log(params.id);
  return NextResponse.json({
    code: 200,
    message: "操作成功",
  });
};
